<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex improveData_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between improveData_fd0_0'>
					<view class='flex flex-wrap align-center improveData_fd0_0_c0' @tap="handleJumpDiy" data-type="back"
						data-url="1">
						<text class='fu-iconfont2  improveData_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='improveData_fd0_0_c1_c0'>申请入驻</text>
					</view>
					<view class='flex align-center justify-end improveData_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-wrap align-center benben-flex-layout improveData_flex_1">
				<view class='flex flex-wrap align-center improveData_fd1_0'>
				</view>
				<text class='improveData_fd1_1'>个人信息</text>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout improveData_flex_2">
				<view class='flex flex-wrap align-center improveDataes_fd5_0001' @tap.stop="handleJumpDiy"
					data-type="navigateTo"
					:data-url="`/pages/login/shopStoreReview/shopStoreReview?fid=${settleData.usermerchant_id || ''}`">
					<text class='improveDataes_fd5_0_c1'>选择入驻商家</text>
					<benben-input class='flex-sub improveDataes_fd5_0_c2' type="text" :placeholder="`请选择入驻商家`"
						confirm-type="done" :maxlength="150" :disabled='true'
						placeholder-style="color:rgba(191, 191, 191, 1);font-size:32rpx"
						v-model="settleData.store_name" />
					<text class='fu-iconfont2  improveDataes_fd5_8_c3'>&#xe7f2;</text>
				</view>
				<view class='flex flex-wrap align-stretch improveData_fd2_0' v-if="switchData.switch != '1'">
					<view class='flex flex-wrap align-center self-start'>
						<text class='improveData_fd2_0_c0_c0'>*</text>
						<text class='improveData_fd2_0_c0_c1'>工装头像</text>
					</view>
					<view class="upload position-relative">
						<image class=" improveData_fd2_0_c1_image" mode="aspectFill"
							@tap="croppingUploadImage('avatar','avatar',settleData,settleData)"
							:src="settleData.avatar ? settleData.avatar : STATIC_URL+'127.jpg'"></image>
					</view>
				</view>
				<text class='improveData_fd2_1' v-if="switchData.switch != '1'">注：头像即为服务人寰形象照，是用户下单选择服务
					人员时的重要参考，请上传正面半身免冠照。尺寸需
					大于750*750像素，背景为浅色</text>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center improveData_flex_3">
			</view>

			<!---flex布局flex布局结束-->
			<!--现居地址选择器开始 -->
			<benben-picker ref="benbenWritePickerCodepicker4" :visible.sync="pickerDiy1692607217293"
				:city.sync='settleData.service_city' :label.sync='settleData.address' mode='region' :mask-show='true'
				:picker-height='88' :hide-area='false'>
				<template #picker-header>
					<view class='flex flex-wrap align-center justify-between improveData_picker4_0'>
						<text class='improveData_picker4_0_c0'
							@tap="$refs.benbenWritePickerCodepicker4.cancel()">取消</text>
						<text class='improveData_picker4_0_c1'>请选择</text>
						<text class='improveData_picker4_0_c2'
							@tap="$refs.benbenWritePickerCodepicker4.pickerConfirm()">确认</text>
					</view>
				</template>
			</benben-picker>
			<!--现居地址选择器结束 -->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout improveData_flex_5">
				<view class='flex flex-wrap align-center improveData_fd5_0'>
					<view class='flex flex-wrap align-center self-start'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_0_c0_c1'>真实姓名</text>
					</view>
					<benben-input class='flex-sub improveData_fd5_0_c1' type="text" :placeholder="`请输入真实姓名`"
						confirm-type="done" :maxlength="50"
						placeholder-style="color:rgba(191, 191, 191, 1);font-size:32rpx" v-model="settleData.name" />
				</view>
				<view class='flex flex-wrap align-center improveData_fd5_0'>
					<view class='flex flex-wrap align-center self-start'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_0_c0_c1'>身份证号码</text>
					</view>
					<benben-input class='flex-sub improveData_fd5_1_c1' type="idcard" :placeholder="`请输入证件号码`"
						confirm-type="done" :maxlength="18"
						placeholder-style="color:rgba(191, 191, 191, 1);font-size:32rpx"
						v-model="settleData.idcard_no" />
				</view>
				<view class='flex flex-direction flex-wrap align-center justify-between improveData_fd5_2'
					v-if="switchData.switch != '1'">
					<view class="upload position-relative">
						<image class=" improveData_fd5_2_c0_image" mode="aspectFill"
							@tap="soloChooseImage('idcard_emblem','idcard_emblem',settleData,settleData)"
							:src="settleData.idcard_emblem ? settleData.idcard_emblem : STATIC_URL+'97.png'">
						</image>
					</view>
					<view class='flex flex-wrap align-end'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_2_c1_c1'>请上传身份证正面(国徽面)</text>
					</view>
				</view>
				<view class='flex flex-direction flex-wrap align-center justify-between improveData_fd5_3'
					v-if="switchData.switch != '1'">
					<view class="upload position-relative">
						<image class=" improveData_fd5_2_c0_image" mode="aspectFill"
							@tap="soloChooseImage('idcard_portrait','idcard_portrait',settleData,settleData)"
							:src="settleData.idcard_portrait ? settleData.idcard_portrait : STATIC_URL+'98.png'">
						</image>
					</view>
					<view class='flex flex-wrap align-end'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_2_c1_c1'>请上传身份证反面(人像面)</text>
					</view>
				</view>
				<view class='flex flex-direction flex-wrap align-center justify-between improveData_fd5_3'
					v-if="switchData.switch != '1'">
					<view class="upload position-relative">


						<image class=" improveData_fd5_2_c0_image" mode="aspectFill"
							@tap="soloChooseImage('hand_card','hand_card',settleData,settleData)"
							:src="settleData.hand_card ? settleData.hand_card : STATIC_URL+'99.png'"></image>
					</view>
					<view class='flex flex-wrap align-end'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_2_c1_c1'>手持身份证照</text>
					</view>
				</view>
				<view class='flex flex-wrap align-center'>
					<text class='improveData_fd5_0_c0_c0'>*</text>
					<text class='improveData_fd5_5_c1'>个人介绍</text>
				</view>
				<view class='flex flex-wrap align-center improveData_fd5_6'>
					<view class='flex flex-wrap improveData_fd5_6_c0'>
						<textarea class='flex improveData_input_fd5_6_c0' :placeholder="'请输入个人介绍'" :maxlength="240"
							placeholder-style="color:#999;font-size:28rpx" v-model="settleData.remark" />

					</view>
				</view>
				<view class='flex flex-wrap align-center improveData_fd6_7001' v-if="switchData.switch != '1'">
					<!-- <text class='improveData_fd5_0_c0_c0'>*</text> -->
					<text class='improveData_fd5_5_c1'>个人风采</text>
				</view>
				<view class='flex flex-wrap align-center improveData_fd6_8' v-if="switchData.switch != '1'">
					<benben-images-upload ref="benbenImagesUploadfd6_8_c0" :img-list.sync="settleData.pictures"
						:img-ids.sync="picturesList" :maxlength="9">
						<template #content="{ num, maxlength, isShow, imgList }">
							<view class="flex flex-wrap align-start flex">
								<view v-for="(image, index) in imgList" :key="index"
									class='flex position-relative improveData_fd6_8_c00'>
									<text class='fu-iconfont2 position-absolute improveData_fd6_8_c000'
										@tap.stop="$refs.benbenImagesUploadfd6_8_c0.delImage(index)">&#xE8E7;</text>
									<image class='improveData_fd6_8_c001'
										@tap.stop="$refs.benbenImagesUploadfd6_8_c0.previewImage(index)"
										mode="aspectFill" :src='image'></image>
								</view>
								<image class='improveData_fd6_8_c01'
									@tap.stop="$refs.benbenImagesUploadfd6_8_c0.manyChooseImage()" v-if="isShow"
									mode="aspectFill" :src='STATIC_URL+"127.jpg"'></image>
							</view>
						</template>
					</benben-images-upload>
				</view>
				<view class='flex flex-wrap align-center improveData_fd6_7002' v-if="switchData.switch != '1'">
					<!-- <text class='improveData_fd5_0_c0_c0'>*</text> -->
					<text class='improveData_fd5_5_c1'>资质证书</text>
				</view>
				<view class='flex flex-wrap align-center improveData_fd6_8' v-if="switchData.switch != '1'">
					<benben-images-upload ref="benbenImagesUploadfd6_8_c1" :img-list.sync="settleData.certificates"
						:img-ids.sync="certificatesList" :maxlength="9">
						<template #content="{ num, maxlength, isShow, imgList }">
							<view class="flex flex-wrap align-start flex">
								<view v-for="(image, index) in imgList" :key="index"
									class='flex position-relative improveData_fd6_8_c00'>
									<text class='fu-iconfont2 position-absolute improveData_fd6_8_c000'
										@tap.stop="$refs.benbenImagesUploadfd6_8_c1.delImage(index)">&#xE8E7;</text>
									<image class='improveData_fd6_8_c001'
										@tap.stop="$refs.benbenImagesUploadfd6_8_c1.previewImage(index)"
										mode="aspectFill" :src='image'></image>
								</view>
								<image class='improveData_fd6_8_c01'
									@tap.stop="$refs.benbenImagesUploadfd6_8_c1.manyChooseImage()" v-if="isShow"
									mode="aspectFill" :src='STATIC_URL+"127.jpg"'></image>
							</view>
						</template>
					</benben-images-upload>
				</view>
				<view class='flex flex-wrap align-center improveData_fd5_0001'>
					<view class='flex flex-wrap align-center self-start'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_0_c0_c1'>从业时间</text>
					</view>
					<!-- <text class='improveData_fd5_0_c0_c1'>从业时间</text> -->
					<benben-input class='flex-sub improveData_fd5_0_c1' type="number" :placeholder="`请输入从业时间(1~99)`"
						confirm-type="done" :maxlength="2"
						placeholder-style="color:rgba(153, 153, 153, 1);font-size:32rpx"
						v-model="settleData.practise_time" />
					<text class='improveData_fd5_7_c3'>年</text>
				</view>
				<view class='flex flex-wrap align-center improveData_fd5_0' @tap.stop="pickerDiy1692607217293=true">
					<view class='flex flex-wrap align-center self-start'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_0_c0_c1'>现居地址</text>
					</view>
					<benben-input class='flex-sub improveData_fd5_0_c1' type="text" :placeholder="`请选择`"
						confirm-type="done" :maxlength="-1" :disabled='true'
						placeholder-style="color:rgba(51, 51, 51, 1);font-size:32rpx" v-model="settleData.address" />
					<text class='fu-iconfont2  improveData_fd5_8_c2'>&#xe7f2;</text>
				</view>
				<view class='flex flex-wrap align-center improveData_fd5_0'>
					<view class='flex flex-wrap align-center self-start'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_0_c0_c1'>详细地址</text>
					</view>
					<benben-input class='flex-sub improveData_fd5_0_c1' type="text" :placeholder="`请输入详细地址`"
						confirm-type="done" :maxlength="200"
						placeholder-style="color:rgba(153, 153, 153, 1);font-size:32rpx"
						v-model="settleData.detail_address" />
				</view>
				<view class='flex flex-wrap align-center improveData_fd5_0'>
					<view class='flex flex-wrap align-center self-start'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_0_c0_c1'>联系方式</text>
					</view>
					<benben-input class='flex-sub improveData_fd5_0_c1' type="number" :placeholder="`请输入联系方式`"
						confirm-type="done" :maxlength="11"
						placeholder-style="color:rgba(153, 153, 153, 1);font-size:32rpx" v-model="settleData.phone" />
				</view>
				<view class='flex flex-wrap align-center self-center improveData_fd5_11'>
					<view class='flex flex-wrap align-center self-center'>
						<text class='improveData_fd5_0_c0_c0'>*</text>
						<text class='improveData_fd5_0_c0_c1'>备用联系方式</text>
					</view>
					<benben-input class='flex-sub improveData_fd5_11_c1' type="number" :placeholder="`请输入备用联系方式`"
						confirm-type="done" :maxlength="11"
						placeholder-style="color:rgba(153, 153, 153, 1);font-size:32rpx"
						v-model="settleData.standby_phone" />
				</view>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center improveData_flex_6">
				<view class='flex flex-wrap align-center improveData_fd6_0'>
				</view>
				<text class='improveData_fd6_1'>服务承诺</text>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout improveData_flex_7">
				<view class='flex flex-wrap align-center improveData_fd7_0' @tap.stop="handleJumpDiy"
					data-type="navigateTo" :data-url="`/pages/login/skill/skill?aid=${settleData.fid}`">
					<view class='flex flex-wrap align-center self-start'>
						<text class='improveData_fd7_0_c0_c0'>*</text>
						<text class='improveData_fd7_0_c0_c1'>服务技能</text>
					</view>
					<benben-input class='flex-sub improveData_fd7_0_c1' type="text" :placeholder="`请选择`"
						confirm-type="done" :maxlength="-1" :disabled='true'
						placeholder-style="color:rgba(51, 51, 51, 1);font-size:32rpx"
						v-model="settleData.category_name" />
					<text class='fu-iconfont2  improveData_fd7_0_c2'>&#xe7f2;</text>
				</view>
				<view class='flex flex-wrap align-center improveData_fd7_0' @tap.stop="handleJumpDiy"
					data-type="navigateTo" :data-url="`/pages/login/region/region?id=${settleData.chinaarea_id}`">
					<view class='flex flex-wrap align-center self-start'>
						<text class='improveData_fd7_0_c0_c0'>*</text>
						<text class='improveData_fd7_0_c0_c1'>服务区域</text>
					</view>
					<benben-input class='flex-sub improveData_fd7_0_c1' type="text" :placeholder="`请选择`"
						confirm-type="done" :maxlength="-1" :disabled='true'
						placeholder-style="color:rgba(51, 51, 51, 1);font-size:32rpx"
						v-model="settleData.service_area" />
					<text class='fu-iconfont2  improveData_fd7_0_c2'>&#xe7f2;</text>
				</view>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout improveData_flex_8">
				<view class='flex flex-wrap align-center justify-center improveData_fd8_0'>
					<view class='flex flex-wrap align-center improveData_fd8_0_c0'>
					</view>
					<text class='improveData_fd8_0_c1'>服务承诺</text>
					<view class='flex flex-wrap align-center improveData_fd8_0_c0'>
					</view>
				</view>
				<view class='flex flex-wrap align-start improveData_fd8_1'>
					<view class='flex flex-wrap align-center justify-end improveData_fd8_1_c0'>
					</view>
					<text class='flex-sub improveData_fd8_1_c1'>因工作照及身份证需作为审核依据，拍摄照片时，请勿开启美
						颜/滤镜等，以确保照片内容清晰真实。</text>
				</view>
				<view class='flex flex-wrap align-start improveData_fd8_1'>
					<view class='flex flex-wrap align-center justify-end improveData_fd8_1_c0'>
					</view>
					<text class='flex-sub improveData_fd8_1_c1'>审核通过，即可平台进行接单，请严格遵守相关法律法规，秉
						承为用户服务的基本理念，细致、热情、负责为用户提供服务。</text>
				</view>
			</view>

			<!---flex布局flex布局结束-->
			<view class="flex flex-direction flex-wrap align-center benben-position-layout flex improveData_flex_9">
				<view class='flex flex-wrap align-center improveData_fd9_0'>
					<benben-flex-switch-new class-name='flex flex improveData_fd9_0_c0' v-model="check"
						:disabled='false'>
						<template v-slot:checked>

							<view class='flex flex position-relative align-center'>
								<image class='improveData_checkfd9_0_c0_c0_c0' mode="aspectFit"
									:src='STATIC_URL+"100.png"'></image>
							</view>

						</template>
						<template v-slot:unchecked>

							<view class='flex flex position-relative justify-end align-center'>
								<image class='improveData_checkfd9_0_c0_c0_c0' mode="aspectFit"
									:src='STATIC_URL+"49.png"'></image>
							</view>

						</template>
					</benben-flex-switch-new>
					<text class='improveData_fd9_0_c1'>勾选表示您已仔细阅读并同意</text>
					<text class='improveData_fd9_0_c2' @tap="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/login/accommodationAgreement/accommodationAgreement`">《入驻协议》</text>
				</view>
				<button class='improveData_fd9_1' @tap="submitApplicationFunc()">提交申请</button>

			</view>
			<view :style="{height: '257rpx'}"></view>
			<!--选择店铺选择器开始 -->
			<!-- 		<benben-picker ref="benbenWritePickerCodepicker3" :visible.sync="pickerDiy1714352086894"
				:label.sync='settleData.store_name' :value.sync='settleData.usermerchant_id' :options='shopList'
				mode='selector' :mask-show='true' :timeout='true' :picker-height='88' default-type='aid'
				:default-props='{"label":"store_name","value":"aid"}'>
				<template #picker-header>
					<view class='flex flex-wrap align-center justify-between improveDataes_picker3_0'>
						<text class='improveDataes_picker3_0_c0'
							@tap="$refs.benbenWritePickerCodepicker3.cancel()">取消</text>
						<text class='improveDataes_picker3_0_c1'>请选择</text>
						<text class='improveDataes_picker3_0_c2'
							@tap="$refs.benbenWritePickerCodepicker3.pickerConfirm()">确认</text>
					</view>
				</template>
			</benben-picker> -->
			<!--选择店铺选择器结束 -->

		</view>
	</view>
</template>
<script>
	import UploadImage from '@/common/utils/upload-image.js'
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"pickerDiy1692607217293": false,
				"switchData": {
					"aid": "",
					"sys_num": "",
					"sys_time": ""
				},
				// "pickerDiy1714352086894": false,
				"check": false,
				"settleData": {
					"aid": "",
					"idcard_no": "",
					"name": "",
					"idcard_emblem": "",
					"idcard_portrait": "",
					"idcard_time": "",
					"reason": "",
					"status": "",
					"phone": "",
					"skill": "",
					"sex": "",
					"address": "",
					"credentials": "",
					"avatar": "",
					"type_name": "",
					"mature_time": "",
					"aptitude_start_time": "",
					"certificatetype_id": "",
					"fid": "",
					"hand_card": "",
					"service_city": "",
					"standby_phone": "",
					"store_name": "",
					"detail_address": "",
					"service_area": "",
					"category_name": "",
					"chinaarea_id": "",
					"remark": "",
					"practise_time": ""
				},
				"type": "",
				"shopList": [],
				"picturesList": [],
				"certificatesList": [],
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
			userInfo: {
				get() {
					return this.$store.state.userInfo
				},
				set() {
					this.$store.commit('updateUserInfo', value)
				},
			},
			/**
			 * @returns 
			 * Android       安卓
			 * IOS       苹果
			 * Web       H5 或 pc
			 * Wechat       微信小程序
			 * Alipay       支付宝小程序
			 * Baidu       百度小程序
			 * ByteBounce       抖音小程序
			 * 360       360小程序
			 * FastApp       快应用
			 */
			appSystemIdentification() {
				return this.$store.state.appSystemIdentification
			}
		},
		watch: {},
		onLoad(options) {
			let {
				type
			} = options
			if (type !== undefined) this.type = type
			this.getDataFunc()
			this.getSwitchFunc()
			this.diyPageListen()
		},
		onUnload() {
			this.diyOffPageListen()
		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//上传单图、多图方法
			soloChooseImage(id, path, obj, obj1, fnName = false) {
				if (!this.setCheckPermission(2)) {
					return
				}
				let self = this
				if (!obj) obj = this
				if (!obj1) obj1 = this
				if (self.uploading) {
					return
				}
				// 从相册中选择图片
				uni.chooseImage({
					count: 1, // 默认3
					sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
					success: function(res) {
						self.uploading = true
						// 开始上传
						new UploadImage(res.tempFiles, {
							complete: function(res) {
								self.uploading = false
								if (id) self.$set(obj, id, res[0].id)
								if (path) self.$set(obj1, path, res[0].path)
								if (fnName) self[fnName]()
							},
						})
					},
				})
			},
			//裁剪图片上传
			croppingUploadImage(id, path, obj, obj1, fnName = false) {
				if (!this.setCheckPermission(2)) {
					return
				}
				let self = this
				if (!obj) obj = this
				if (!obj1) obj1 = this
				let itemList = obj1[path] ? ['修改头像', '拍照', '从手机相册选择'] : ['拍照', '从手机相册选择']

				function imageCroppingCuccess() {
					uni.$once('image-cropping-success', (file) => {
						if (!file) return
						new UploadImage([file], {
							complete: (res) => {
								if (id) self.$set(obj, id, res[0].id)
								if (path) self.$set(obj1, path, res[0].path)
								if (fnName) self[fnName]()
							},
						})
					})
				}
				uni.showActionSheet({
					itemList: itemList,
					success: function(res) {
						if (res.tapIndex == 0 && obj1[path]) {
							uni.navigateTo({
								url: '/pages/benben-built-in/image-cropping/image-cropping?rectHeight=200&rectWidth=200&&myImgUrl=' +
									obj1[path],
								animationDuration: 0,
							})
							imageCroppingCuccess()
						}
						if ((res.tapIndex == 1 && obj1[path]) || (res.tapIndex == 0 && !obj1[path])) {
							uni.chooseImage({
								count: 1,
								sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
								sourceType: ['camera'], // 可以指定来源是相册还是相机，默认二者都有
								success: (res) => {
									// 跳转到图片裁切页面
									uni.navigateTo({
										url: `/pages/benben-built-in/image-cropping/image-cropping?rectHeight=200&rectWidth=200&fileType=${res.tempFiles[0].type}&myImgUrl=${res.tempFilePaths[0]}`,
										animationDuration: 0,
									})
									imageCroppingCuccess()
								},
							})
						}
						if ((res.tapIndex == 2 && obj1[path]) || (res.tapIndex == 1 && !obj1[path])) {
							uni.chooseImage({
								count: 1,
								sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
								sourceType: ['album'], // 可以指定来源是相册还是相机，默认二者都有
								success: (res) => {
									// 跳转到图片裁切页面
									uni.navigateTo({
										url: `/pages/benben-built-in/image-cropping/image-cropping?rectHeight=200&rectWidth=200&fileType=${res.tempFiles[0].type}&myImgUrl=${res.tempFilePaths[0]}`,
										animationDuration: 0,
									})
									imageCroppingCuccess()
								},
							})
						}
					},
					fail: function(res) {
						console.log(res.errMsg)
					},
				})
			},
			//获取上架开关
			async getSwitchFunc() {

				//请求方法
				//数据验证

				let dataswitchData = await this.$api.get(global.apiUrls.post643e0feac967e, {

				});

				if (dataswitchData.data.code != 1) {
					this.$message.info(dataswitchData.data.msg);
					return
				}
				let infoswitchData = dataswitchData.data;
				this.switchData = infoswitchData.data


			},
			//提交申请
			async submitApplicationFunc() {
				if (this.switchData.switch != 1) {
					if (!validate(this.settleData.avatar, 'require')) {
						this.$message.info('工装头像不能为空');
						return false;
					}
				}
				// if (!validate(this.settleData.avatar, 'require')) {
				// 	this.$message.info('工装头像不能为空');
				// 	return false;
				// }
				if (!validate(this.settleData.name, 'require')) {
					this.$message.info('真实姓名不能为空');
					return false;
				}
				if (!validate(this.settleData.idcard_no, 'require')) {
					this.$message.info('身份证号不能为空');
					return false;
				}
				if (!validate(this.settleData.idcard_no, 'idcard')) {
					this.$message.info('请输入正确的身份证号');
					return false;
				}
				if (this.switchData.switch != 1) {
					if (!validate(this.settleData.idcard_emblem, 'require')) {
						this.$message.info('身份证国徽面不能为空');
						return false;
					}
					if (!validate(this.settleData.idcard_portrait, 'require')) {
						this.$message.info('身份证人像面不能为空');
						return false;
					}
					if (!validate(this.settleData.hand_card, 'require')) {
						this.$message.info('手持身份证不能为空');
						return false;
					}
				}

				if (!validate(this.settleData.remark, 'require')) {
					this.$message.info('个人介绍不能为空');
					return false;
				}
				if (!validate(this.settleData.practise_time, 'require')) {
					this.$message.info('从业时间不能为空');
					return false;
				}
				if (!validate(this.settleData.address, 'require')) {
					this.$message.info('请选择现居地址');
					return false;
				}
				if (!validate(this.settleData.detail_address, 'require')) {
					this.$message.info('详细地址不能为空');
					return false;
				}
				if (!validate(this.settleData.phone, 'require')) {
					this.$message.info('联系方式不能为空');
					return false;
				}
				if (!validate(this.settleData.phone, 'phone')) {
					this.$message.info('请输入正确的联系方式');
					return false;
				}
				if (!validate(this.settleData.standby_phone, 'require')) {
					this.$message.info('备用联系方式不能为空');
					return false;
				}
				if (!validate(this.settleData.standby_phone, 'phone')) {
					this.$message.info('请输入正确的备用联系方式');
					return false;
				}
				if (!validate(this.settleData.fid, 'require')) {
					this.$message.info('服务技能不能为空');
					return false;
				}
				if (!validate(this.settleData.service_area, 'require')) {
					this.$message.info('服务区域不能为空');
					return false;
				}
				if (this.check === false) {
					this.$message.info('请仔细阅读并勾选同意《入驻协议》');
					return false;
				}
				//请求方法
				//数据验证

				let data637c7d436e440 = await this.$api.dbPost(global.apiUrls.post637c7d436e440, {
					phone: this.settleData.phone,
					name: this.settleData.name,
					idcard_no: this.settleData.idcard_no,
					idcard_emblem: this.settleData.idcard_emblem,
					idcard_portrait: this.settleData.idcard_portrait,
					fid: this.settleData.fid,
					avatar: this.settleData.avatar,
					hand_card: this.settleData.hand_card,
					standby_phone: this.settleData.standby_phone,
					detail_address: this.settleData.detail_address,
					address: this.settleData.address,
					service_area: this.settleData.service_area,
					user_id: this.userInfo.id,
					chinaarea_id: this.settleData.chinaarea_id,
					remark: this.settleData.remark,
					practise_time: this.settleData.practise_time,
					usermerchant_id: this.settleData.usermerchant_id,
					service_city: this.settleData.service_city,
					certificates: this.settleData.certificates,
					pictures: this.settleData.pictures,
				});
				if (!data637c7d436e440) return
				if (data637c7d436e440.data.code != 1) {
					this.$message.info(data637c7d436e440.data.msg);
					return
				}



				this.$urouter.navigateTo(`/pages/login/examines/examines`);
			},
			//获取认证信息
			async getDataFunc() {
				if (this.type == '1') {
					//请求方法
					//数据验证

					let datasettleData = await this.$api.dbGet(global.apiUrls.post637c7e1d7d61e, {
						user_id: this.userInfo.id
					});
					if (!datasettleData) return
					if (datasettleData.data.code != 1) {
						this.$message.info(datasettleData.data.msg);
						return
					}
					let infosettleData = datasettleData.data;
					this.settleData = infosettleData.data

				}
			},
			prevDateFun(data) {
				console.log(data, '这是大大阿达阿达阿达');
				this.settleData.usermerchant_id = data.id
				this.settleData.store_name = data.name;
			},
			//页面监听
			diyPageListen() {
				uni.$on('skillData', (data) => {
					this.settleData.category_name = data.name;
					this.settleData.fid = data.aid;
				});
				uni.$on('serviceData', (data) => {
					this.settleData.service_area = data.name;
					this.settleData.chinaarea_id = data.aid;
				});
				uni.$on('shopData', (data) => {
					this.settleData.store_name = data.name;
					this.settleData.usermerchant_id = data.id;
				});
			},
			//注销页面监听
			diyOffPageListen() {
				uni.$off('skillData');
				uni.$off('serviceData');
				uni.$off('shopData');
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;
	}

	.improveData_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.improveData_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
	}

	.improveData_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
		font-weight: 500;
	}

	.improveData_fd0_0_c0 {
		width: 100rpx;
	}

	.improveData_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.improveData_flex_1 {
		background: rgba(243, 249, 255, 1);
		padding: 27rpx 32rpx 27rpx 32rpx;
		background-size: 100% auto !important;
	}

	.improveData_fd1_1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 700;
		line-height: 45rpx;
	}

	.improveData_fd1_0 {
		background: rgba(48, 144, 255, 1);
		width: 8rpx;
		height: 34rpx;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		background-size: 100% auto;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.improveData_flex_2 {
		padding: 0rpx 32rpx 32rpx 32rpx;
	}

	.improveData_fd2_1 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
		margin: 0rpx 67rpx 0rpx 67rpx;
	}

	.improveData_fd2_0_c1_image {
		width: 220rpx;
		height: 220rpx;
		border-radius: 16rpx;
	}

	.improveData_fd2_0_c0_c1 {
		color: #000000;
		font-size: 32rpx;
		font-weight: 400;
		line-height: 45rpx;
		margin: 0rpx 105rpx 0rpx 0rpx;
	}

	.improveData_fd2_0_c0_c0 {
		color: rgba(255, 0, 0, 1);
	}

	.improveData_fd2_0 {
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.improveData_flex_3 {
		background: rgba(248, 248, 248, 1);
		height: 20rpx;
		background-size: 100% auto;
	}

	.improveData_picker4_0_c2 {
		font-size: 32rpx;
		font-weight: 400;
		color: rgba(71, 129, 245, 1);
		line-height: 40rpx;
	}

	.improveData_picker4_0_c1 {
		font-size: 36rpx;
		font-weight: 400;
		color: #333;
		line-height: 45rpx;
	}

	.improveData_picker4_0_c0 {
		font-size: 32rpx;
		font-weight: 400;
		color: #333;
		line-height: 40rpx;
	}

	.improveData_picker4_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		padding: 0rpx 32rpx 0rpx 32rpx;
		border-radius: 25rpx 25rpx 0rpx 0rpx;
		background-size: 100% auto !important;
		height: 110rpx;
	}

	.improveData_flex_5 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.improveData_fd5_11_c1 {
		height: 110rpx;
		line-height: 110rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		text-align: right;
	}

	.improveData_fd5_11 {
		border-bottom: 1px solid #eee;
	}

	.improveData_fd5_8_c2 {
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(191, 191, 191, 1);
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.improveData_fd5_7_c3 {
		color: var(--benbenFontColor0);
		font-size: 32rpx;
		font-weight: 600;
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.improveData_input_fd5_6_c0 {
		width: 100%;
		height: 160rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		white-space: pre-wrap;
	}

	.improveData_fd5_6_c0 {
		background: rgba(248, 248, 248, 1);
		width: 100%;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		padding: 24rpx 24rpx 24rpx 24rpx;
		background-size: 100% auto;
	}

	.improveData_fd5_6 {
		border-bottom: 1px solid #eee;
		margin: 24rpx 0rpx 0rpx 0rpx;
		padding: 0rpx 0rpx 32rpx 0rpx;
	}

	.improveData_fd5_5_c1 {
		font-size: 32rpx;
	}

	.improveData_fd5_3 {
		margin: 0rpx 0rpx 56rpx 0rpx;
	}

	.improveData_fd5_2_c1_c1 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
		margin: 24rpx 0rpx 0rpx 0rpx;
	}

	.improveData_fd5_2_c0_image {
		width: 400rpx;
		height: 252rpx;
	}

	.improveData_fd5_2 {
		margin: 32rpx 0rpx 56rpx 0rpx;
	}

	.improveData_fd5_1_c1 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		text-align: right;
	}

	.improveData_fd5_0_c1 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		text-align: right;
		margin: 0rpx 0rpx 0rpx 24rpx;
	}

	.improveData_fd5_0_c0_c1 {
		color: #000000;
		font-size: 32rpx;
		font-weight: 400;
	}

	.improveData_fd5_0_c0_c0 {
		color: rgba(255, 0, 0, 1);
	}

	.improveData_fd5_0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.improveData_fd5_0001 {
		border-bottom: 1px solid #eee;
		padding: 0rpx 0rpx 32rpx 0rpx;
	}

	.improveData_flex_6 {
		background: rgba(243, 249, 255, 1);
		height: 100rpx;
		background-size: 100% auto;
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.improveData_fd6_1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 700;
		line-height: 45rpx;
	}

	.improveData_fd6_0 {
		background: rgba(48, 144, 255, 1);
		width: 8rpx;
		height: 34rpx;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		background-size: 100% auto;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.improveData_flex_7 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.improveData_fd7_0_c2 {
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(191, 191, 191, 1);
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.improveData_fd7_0_c1 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		text-align: right;
		margin: 0rpx 0rpx 0rpx 24rpx;
	}

	.improveData_fd7_0_c0_c1 {
		color: #000000;
		font-size: 32rpx;
		font-weight: 400;
	}

	.improveData_fd7_0_c0_c0 {
		color: rgba(255, 0, 0, 1);
	}

	.improveData_fd7_0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.improveData_flex_8 {
		background: rgba(248, 248, 248, 1);
		background-size: 100% auto;
		padding: 0rpx 14rpx 0rpx 40rpx;
	}

	.improveData_fd8_1_c1 {
		color: #666666;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 36rpx;
		margin: 0rpx 0rpx 0rpx 0rpx;
	}

	.improveData_fd8_1_c0 {
		background: rgba(48, 144, 255, 1);
		width: 8rpx;
		height: 8rpx;
		background-size: 100% auto;
		margin: 15rpx 16rpx 0rpx 0rpx;
	}

	.improveData_fd8_1 {
		margin: 0rpx 0rpx 32rpx 0rpx;
	}

	.improveData_fd8_0_c1 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
		margin: 0rpx 16rpx 0rpx 16rpx;
	}

	.improveData_fd8_0_c0 {
		background: rgba(238, 238, 238, 1);
		width: 255rpx;
		height: 1rpx;
		background-size: 100% auto;
	}

	.improveData_fd8_0 {
		padding: 32rpx 0rpx 24rpx 0rpx;
	}

	.improveData_flex_9 {
		background: rgba(255, 255, 255, 1);
		width: 750rpx;
		height: 257rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(0rpx + var(--window-bottom));
		background-size: 100% auto;
	}

	.improveData_fd9_1 {
		background: #3090FF;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 32rpx;
		color: #fff;
		width: 686rpx;
		height: 88rpx;
		line-height: 88rpx;
		font-weight: 400;
	}

	.improveData_fd9_0_c2 {
		font-size: 24rpx;
		font-weight: 400;
		color: rgba(67, 98, 162, 1);
	}

	.improveData_fd9_0_c1 {
		font-size: 24rpx;
		font-weight: 400;
		color: #333;
	}

	.improveData_checkfd9_0_c0_c0_c0 {
		width: 28rpx;
		height: 28rpx;
	}

	::v-deep .improveData_fd9_0_c0 {
		margin: 4rpx 16rpx 0rpx 0rpx;
	}

	.improveData_fd9_0 {
		margin: 56rpx 0rpx 40rpx 0rpx;
	}

	.improveDataes_fd5_0001 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
		margin-bottom: 32rpx;
	}

	.improveDataes_fd5_0_c1 {
		color: #000000;
		font-size: 32rpx;
		font-weight: 400;
	}

	.improveDataes_fd5_0_c2 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		text-align: right;
		margin: 0rpx 0rpx 0rpx 24rpx;
	}

	.improveDataes_fd5_8_c3 {
		font-size: 28rpx;
		font-weight: 400;
		color: rgba(191, 191, 191, 1);
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	//选择器
	.improveDataes_picker3_0_c2 {
		font-size: 32rpx;
		font-weight: 400;
		color: var(--benbenFontColor4);
		line-height: 40rpx;
	}

	.improveDataes_picker3_0_c1 {
		font-size: 36rpx;
		font-weight: 400;
		color: #333;
		line-height: 45rpx;
	}

	.improveDataes_picker3_0_c0 {
		font-size: 32rpx;
		font-weight: 400;
		color: #333;
		line-height: 40rpx;
	}

	.improveDataes_picker3_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		padding: 0rpx 32rpx 0rpx 32rpx;
		border-radius: 24rpx 24rpx 0rpx 0rpx;
		background-size: 100% auto !important;
		height: 110rpx;
	}

	//
	.improveData_fd6_7 {
		margin: 0rpx 0rpx 32rpx 0rpx;
	}

	.improveData_fd6_7001 {
		margin: 32rpx 0rpx 32rpx 0rpx;
	}

	.improveData_fd6_7002 {
		margin: 0rpx 0rpx 32rpx 0rpx;
	}

	.improveData_fd6_8_c01 {
		width: 200rpx;
		height: 200rpx;
		margin: 0rpx 24rpx 24rpx 0rpx;
	}

	.improveData_fd6_8_c001 {
		width: 200rpx;
		height: 200rpx;
		border-radius: 16rpx;
	}

	.improveData_fd6_8_c000 {
		top: 0rpx;
		right: 0rpx;
		z-index: 9;
		color: #ff5536;
	}

	.improveData_fd6_8_c00 {
		margin: 0rpx 24rpx 24rpx 0rpx;
	}

	.improveData_fd6_8 {
		margin: 0rpx 0rpx 8rpx 0rpx;
	}
</style>